package winterTest.day10;

import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.chart.LineChart;
import javafx.scene.chart.NumberAxis;
import javafx.scene.chart.XYChart;
import javafx.stage.Stage;

public class LineChartApp extends Application {
	public static void main(String[] args) {
		launch(args);
	}

	@Override
	public void start(Stage primaryStage) throws Exception {
		
		NumberAxis xAxis = new NumberAxis("Values for X-Axis", 0, 3, 1);
		NumberAxis yAxis = new NumberAxis("Values for Y-Axis", 0, 3, 1);

		LineChart lineChart = new LineChart(xAxis, yAxis);

		XYChart.Series series = new XYChart.Series<>();
		series.getData().add(new XYChart.Data<>(0.0,1.0));
		series.getData().add(new XYChart.Data<>(1.0,2.2));
		
		lineChart.getData().add(series);
		
		Scene scene = new Scene(lineChart);

		primaryStage.setScene(scene);
		primaryStage.show();

	}

}